
<%
metamodel http://www.eclipse.org/uml2/2.0.0/UML


import org.acceleo.modules.uml2.services.Uml2Services
import org.acceleo.modules.uml2.services.StringServices

import org.taam.modules.web_completion

%>

<%-- 
This template generate web.xml configuration file
--%>

<%script type="Model" name="generate" file="web.xml"%>
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app 
	id="AcceleoSample" 
	version="2.4" 
	xmlns="http://java.sun.com/xml/ns/j2ee" 
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
	xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

	<display-name>Taam</display-name>
	
	<!-- Standard Servlet Configuration (with debugging) -->
	<%for (eAllContents("Class")){%><%if (hasStereotype("Entity")){%>
	<servlet>
		<servlet-name><%name%>Control</servlet-name>
		<servlet-class>org.taam.test.servlets.<%name%>Control</servlet-class>
	</servlet>
	<%}%><%}%>

	<!-- Standard Servlet Mapping -->
	<%for (eAllContents("Class")){%><%if (hasStereotype("Entity")){%>
	<servlet-mapping>
		<servlet-name><%name%>Control</servlet-name>
		<url-pattern>/<%name.firstLower()%>Control</url-pattern>
	</servlet-mapping>
	<%}%><%}%>
	
	<welcome-file-list>
		<welcome-file>index.html</welcome-file>
		<welcome-file>index.jsp</welcome-file>
	</welcome-file-list>
	<jsp-config>
		<%web_completion%>
	</jsp-config>
</web-app>
